import b from 'node:tty';

const {env:o={},argv:a=[],platform:m=""}=typeof process>"u"?{}:process,d="NO_COLOR"in o||a.includes("--no-color"),B="FORCE_COLOR"in o||a.includes("--color"),C=m==="win32",c=o.TERM==="dumb",y=b&&b.isatty&&b.isatty(1)&&o.TERM&&!c,f="CI"in o&&("GITHUB_ACTIONS"in o||"GITLAB_CI"in o||"CIRCLECI"in o),p=!d&&(B||C&&!c||y||f),u=(e,t,n,i,g=t.substring(0,e)+i,s=t.substring(e+n.length),l=s.indexOf(n))=>g+(l<0?s:u(l,s,n,i)),x=(e,t,n,i,g)=>e<0?n+t+i:n+u(e,t,i,g)+i,w=(e,t,n=e,i=e.length+1)=>g=>g||!(g===""||g===void 0)?x((""+g).indexOf(t,i),g,e,t,n):"",O=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},r=(e,t,n)=>{const i=typeof e=="object"?`\x1B[38;2;${e.r};${e.g};${e.b}m`:`\x1B[${e}m`,g=typeof t=="object"?`\x1B[38;2;${t.r};${t.g};${t.b}m`:`\x1B[${t}m`;return w(i,g,n)},h={reset:r(0,0),bold:r(1,22,"\x1B[22m\x1B[1m"),dim:r(2,22,"\x1B[22m\x1B[2m"),italic:r(3,23),underline:r(4,24),inverse:r(7,27),hidden:r(8,28),strikethrough:r(9,29),black:r(30,39),red:r(31,39),green:r(32,39),yellow:r(33,39),blue:r(34,39),magenta:r(35,39),cyan:r(36,39),white:r(37,39),gray:r(90,39),bgBlack:r(40,49),bgRed:r(41,49),bgGreen:r(42,49),bgYellow:r(43,49),bgBlue:r(44,49),bgMagenta:r(45,49),bgCyan:r(46,49),bgWhite:r(47,49),blackBright:r(90,39),redBright:r(91,39),greenBright:r(92,39),yellowBright:r(93,39),blueBright:r(94,39),magentaBright:r(95,39),cyanBright:r(96,39),whiteBright:r(97,39),bgBlackBright:r(100,49),bgRedBright:r(101,49),bgGreenBright:r(102,49),bgYellowBright:r(103,49),bgBlueBright:r(104,49),bgMagentaBright:r(105,49),bgCyanBright:r(106,49),bgWhiteBright:r(107,49)};function R(...e){return t=>e.reduce((n,i)=>i(n),t)}const $=e=>{const t=O(e);return t?r(t,{r:255,g:255,b:255}):r(37,39)},k=({useColor:e=p}={})=>e?h:Object.keys(h).reduce((t,n)=>({...t,[n]:String}),{}),{reset:T,bold:E,dim:F,italic:G,underline:M,inverse:S,hidden:v,strikethrough:L,black:W,red:_,green:j,yellow:Y,blue:A,magenta:D,cyan:N,white:H,gray:U,bgBlack:q,bgRed:z,bgGreen:J,bgYellow:K,bgBlue:P,bgMagenta:Q,bgCyan:V,bgWhite:X,blackBright:Z,redBright:rr,greenBright:tr,yellowBright:er,blueBright:nr,magentaBright:ir,cyanBright:gr}=k();

export { q as bgBlack, P as bgBlue, V as bgCyan, J as bgGreen, Q as bgMagenta, z as bgRed, X as bgWhite, K as bgYellow, W as black, Z as blackBright, A as blue, nr as blueBright, E as bold, h as color, R as composeColors, k as createColors, N as cyan, gr as cyanBright, F as dim, U as gray, j as green, tr as greenBright, $ as hex, v as hidden, S as inverse, p as isColorSupported, G as italic, D as magenta, ir as magentaBright, _ as red, rr as redBright, T as reset, L as strikethrough, M as underline, H as white, Y as yellow, er as yellowBright };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=color.js.map